package at.tasat.util;

import java.util.Iterator;

public class ArrayIterator<T> implements Iterator<T> {
	private final T[] array; 
	private int index;
	
	public ArrayIterator(T[] array) {
		this.array = array;
		index = 0;
	}

	@Override
	public boolean hasNext() {
		return index < array.length;
	}

	@Override
	public T next() {
		return array[index++];
	}

	@Override
	public void remove() {
		throw new UnsupportedOperationException();
	}

}
